E-Tech Timer / E-Tech Timer / splashForm.vbon commit add archived files (d846247)
   1Public Class splashForm
   2
   3    'Total time in seconds for the fading:
   4    Private Const AnimationInSeconds As Double = 0.23
   5
   6    Private Sub Form2_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
   7        My.Settings.updateCheck = False
   8
   9        Dim StartTime As Double = DateAndTime.Timer
  10        Dim ElaspedTime As Double = 0
  11        Do While ElaspedTime < AnimationInSeconds
  12            'if elasped time is .1 seconds then
  13            'the opacity will be .1 / .5 = 20%
  14            Me.Opacity = ElaspedTime / AnimationInSeconds
  15            ElaspedTime = DateAndTime.Timer - StartTime
  16            Me.Refresh()
  17        Loop
  18        My.Settings.firstStart = False
  19        My.Settings.updateCheck = False
  20    End Sub
  21
  22End Class